package com.yjb.demo.websocket.client.application;

import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @author yjb
 * @description
 * @create 2024/9/24 9:42
 */
@Component
public class ClientTests {

    @PostConstruct
    public void client(){
        String uri = "ws://127.0.0.1:8080/demo";
        WebSocketClientDemo myClient = new WebSocketClientDemo(uri);
        Thread thread = new Thread(new WebSocketClientRunner(uri, myClient));
        thread.start();
    }
}
